package org.goldenport.g3.adapters;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

/**
 * @since   Apr.  9, 2011
 * @version Apr.  9, 2011
 * @author  ASAMI, Tomoharu
 */
@Path("/hello")
public class JaxRsAdapterSpecTestJavaBean {
    @GET
//    @Produces(MediaType.TEXT_PLAIN)
// JAX-RS implementation would not correctly handle charset in @Produces.
// Check tomcat and jetty implementation for HttpServletResponse#addHeader method.
    @Produces("text/html; charset=utf8")
    public String greeting() {
        System.out.println("JaxRsAdapterSpecTestBean#greeting");
        return "Hello World";
    }
}
